Integrand size = 33, antiderivative size = 244 \[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {2^{\frac {3}{2}+n} C n \operatorname {AppellF1}\left (\frac {1}{2},1-m,-\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)}+\frac {2^{\frac {1}{2}+n} (C (m-n)+A (1+m+n)) \operatorname {AppellF1}\left (\frac {1}{2},1-m,\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)} \]
[Out]
Time = 0.61 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4174, 4108, 3913, 3910, 138} \[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2^{n+\frac {1}{2}} (A (m+n+1)+C (m-n)) \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \operatorname {AppellF1}\left (\frac {1}{2},1-m,\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right )}{d (m+n+1)}+\frac {C 2^{n+\frac {3}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \operatorname {AppellF1}\left (\frac {1}{2},1-m,-n-\frac {1}{2},\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right )}{d (m+n+1)}+\frac {C \sin (c+d x) \sec ^{m+1}(c+d x) (a \sec (c+d x)+a)^n}{d (m+n+1)} \]
[In]
[Out]
Rule 138
Rule 3910
Rule 3913
Rule 4108
Rule 4174
Rubi steps \begin{align*} \text {integral}& = \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\int \sec ^m(c+d x) (a+a \sec (c+d x))^n (a (C m+A (1+m+n))+a C n \sec (c+d x)) \, dx}{a (1+m+n)} \\ & = \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {(C n) \int \sec ^m(c+d x) (a+a \sec (c+d x))^{1+n} \, dx}{a (1+m+n)}+\left (A+\frac {C (m-n)}{1+m+n}\right ) \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \, dx \\ & = \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\left (C n (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec ^m(c+d x) (1+\sec (c+d x))^{1+n} \, dx}{1+m+n}+\left (\left (A+\frac {C (m-n)}{1+m+n}\right ) (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec ^m(c+d x) (1+\sec (c+d x))^n \, dx \\ & = \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {\left (C n (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1-x)^{-1+m} (2-x)^{\frac {1}{2}+n}}{\sqrt {x}} \, dx,x,1-\sec (c+d x)\right )}{d (1+m+n) \sqrt {1-\sec (c+d x)}}+\frac {\left (\left (A+\frac {C (m-n)}{1+m+n}\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1-x)^{-1+m} (2-x)^{-\frac {1}{2}+n}}{\sqrt {x}} \, dx,x,1-\sec (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}} \\ & = \frac {C \sec ^{1+m}(c+d x) (a+a \sec (c+d x))^n \sin (c+d x)}{d (1+m+n)}+\frac {2^{\frac {3}{2}+n} C n \operatorname {AppellF1}\left (\frac {1}{2},1-m,-\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d (1+m+n)}+\frac {2^{\frac {1}{2}+n} \left (A+\frac {C (m-n)}{1+m+n}\right ) \operatorname {AppellF1}\left (\frac {1}{2},1-m,\frac {1}{2}-n,\frac {3}{2},1-\sec (c+d x),\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \\ \end{align*}
\[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx \]
[In]
[Out]
\[\int \sec \left (d x +c \right )^{m} \left (a +a \sec \left (d x +c \right )\right )^{n} \left (A +C \sec \left (d x +c \right )^{2}\right )d x\]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{m}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sec ^m(c+d x) (a+a \sec (c+d x))^n \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m \,d x \]
[In]
[Out]